﻿string stars ="*";
int length = 7;
char Blank = ' ';
//实心等腰三角形
for (int i = 1; i <= length; i++)
{
    //空格数
    Console.Write(new string(Blank, length - i));
    //*数
    Console.Write(new string('*',2*i-1));
    //输出空格
    Console.WriteLine();
}
Console.WriteLine();
//直角三角形
for (int i = 1; i <= length; i++)
{
    //*数
    Console.Write(new string('*', i));
    //输出空格
    Console.WriteLine();
}
Console.WriteLine();
//空心等腰三角形
//输出顶角星星
Console.Write(new string(' ', length - 1));
Console.Write(stars);
Console.WriteLine();
//输出其余行空心星星
for (int i = 2; i < length; i++)
{
    Console.Write(new string(Blank, length - i));
    Console.Write("*");
    Console.Write(new string(Blank, 2 * i - 3));
    Console.Write("*");
    Console.WriteLine();
}
//输出最后一行星星
Console.Write(new string('*',2*length-1));
Console.WriteLine();